﻿using ERPPublic;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FinancialManagement.Domain.Model
{
    /// <summary>
    /// 销售合同表
    /// </summary>
    [SugarTable("SaleContract")]
    public class SaleContract : Audit
    {
        /// <summary>
        /// 销售合同id
        /// </summary>
        [SugarColumn(IsIdentity = true, IsPrimaryKey = true)] // 主键和自增
        public int SaleContractId { get; set; }
       
        /// <summary>
        /// 客户id
        /// </summary>
        public int? ClientId { get; set; }
        /// <summary>
        /// 客户名称
        /// </summary>
        public string? ClientName { get; set; }
        /// <summary>
        /// 签约日期
        /// </summary>
        public DateTime? SCAgencyDate { get; set; }
        /// <summary>
        /// 合同主题
        /// </summary>
        public string? ContractTopic { get; set; }
        /// <summary>
        /// 合同编号
        /// </summary>
        public string? SCcontractNumber { get; set; }
        /// <summary>
        /// 起始日期
        /// </summary>
        public DateTime? SCStartDate { get; set; }
        /// <summary>
        /// 截至日期
        /// </summary>
        public DateTime? SCEndDate { get; set; }
        /// <summary>
        /// 我方代表
        /// </summary>
        public string? SCPeople { get; set; }
        /// <summary>
        /// 对方代表
        /// </summary>
        public string? SCCountpartPeople { get; set; }

        /// <summary>
        /// 合同类别
        /// </summary>
        public string? SCContractType { get; set; }
        /// <summary>
        /// 销售人员id
        /// </summary>
        public int? SCSalespeopleId { get; set; }
        /// <summary>
        /// 销售人员
        /// </summary>
        public string? SCSalespeople { get; set; }

        /// <summary>
        /// 制单人员
        /// </summary>
        public string? DocumentMakers { get; set; }
        /// <summary>
        /// 制单日期
        /// </summary>
        public string? DocumentTime { get; set; }
        /// <summary>
        ///  合同金额
        /// </summary>
        public decimal? SCcontractPrice { get; set; }
        /// <summary>
        /// 优惠金额
        /// </summary>
        public decimal? SCPreferentialPrice { get; set; }
        /// <summary>
        /// 优惠后金额
        /// </summary>
        public decimal? PreferentialPrice { get; set; }
        /// <summary>
        /// 运杂费
        /// </summary>
        public decimal? SundryPrice { get; set; }
        /// <summary>
        /// 收货人
        /// </summary>
        public string? SCReceivPeople { get; set; }
        /// <summary>
        /// 手机号码
        /// </summary>
        public string? SCRePhone { get; set; }
        /// <summary>
        /// 省
        /// </summary>
        public int? ProvinceId { get; set; }
        /// <summary>
        /// 市
        /// </summary>
        public int? CityId { get; set; }
        /// <summary>
        /// 详细地址
        /// </summary>
        public  string? SCAddress { get; set; }
        /// <summary>
        /// 数量合计
        /// </summary>
        public int? SCNum { get; set; }
        /// <summary>
        /// 税额总计
        /// </summary>
        public decimal? SCTax { get; set; }
        /// <summary>
        ///预生产id
        /// </summary>
        public int? PreProductionId { get; set; }
        /// <summary>
        ///关联id
        /// </summary>
        public int? RelevancyId { get; set; }
        /// <summary>
        ///关联项目
        /// </summary>
        public string? RelevancyIName { get; set; }
        /// <summary>
        /// 出库状态
        /// </summary>
        public int? SCOutState { get; set; }
        /// <summary>
        /// 发货状态
        /// </summary>
        public  int? SCShipmentState { get; set; }

        /// <summary>
        /// 应收账款id
        /// </summary>
        public string? ARNumber { get; set; }
    }
}
